package main

import (
	"express/dao"
	"express/routers"
	"github.com/gin-gonic/gin"
	_ "gorm.io/driver/mysql"
	"net/http"
)

func main() {
	//gin.SetMode(gin.ReleaseMode)
	//写入日志
	//logfile, err := os.Create("./gin_http.log")
	//if err != nil {
	//	fmt.Println("Could not create log file")
	//}
	//gin.SetMode(gin.DebugMode)
	//gin.DefaultWriter = io.MultiWriter(logfile)

	dao.InitDB()

	//fmt.Println(redis_init.RedisDBs.RedisDB)
	//acc :=
	r := gin.Default()
	//获取所有单号
	routers.Users(r)
	r.GET("/", func(c *gin.Context) {
		c.String(http.StatusOK, "成功了")
	})
	r.Run(":9999")
}
